using System;
using System.Runtime.Serialization;
using Common;
using Common.Enum;

namespace SExperiment.ExperimentResult
{
	[Serializable]
	public class HRMTargetResult : MeltingTargetResult
	{
		private Curve _DerivativeCurve = new Curve();

		[NonSerialized]
		private Curve _NormalizationCurve = new Curve();

		[NonSerialized]
		private Curve _ShiftCurve = new Curve();

		[NonSerialized]
		private Curve _DifferenceCurve = new Curve();

		private EGenoType _GenoType;

		private string _GenoName;

		public Curve DerivativeCurve
		{
			get
			{
				return _DerivativeCurve;
			}
			set
			{
				if (_DerivativeCurve != value)
				{
					_DerivativeCurve = value;
					OnPropertyChanged("DerivativeCurve");
				}
			}
		}

		public Curve NormalizationCurve
		{
			get
			{
				return _NormalizationCurve;
			}
			set
			{
				if (_NormalizationCurve != value)
				{
					_NormalizationCurve = value;
					OnPropertyChanged("NormalizationCurve");
				}
			}
		}

		public Curve ShiftCurve
		{
			get
			{
				return _ShiftCurve;
			}
			set
			{
				if (_ShiftCurve != value)
				{
					_ShiftCurve = value;
					OnPropertyChanged("ShiftCurve");
				}
			}
		}

		public Curve DifferenceCurve
		{
			get
			{
				return _DifferenceCurve;
			}
			set
			{
				if (_DifferenceCurve != value)
				{
					_DifferenceCurve = value;
					OnPropertyChanged("DifferenceCurve");
				}
			}
		}

		public EGenoType GenoType
		{
			get
			{
				return _GenoType;
			}
			set
			{
				if (_GenoType != value)
				{
					_GenoType = value;
					OnPropertyChanged("GenoType");
				}
			}
		}

		public string GenoName
		{
			get
			{
				return _GenoName;
			}
			set
			{
				if (!(_GenoName == value))
				{
					_GenoName = value;
					OnPropertyChanged("GenoName");
				}
			}
		}

		[OnDeserialized]
		private void OnDeserialized(StreamingContext context)
		{
			if (_NormalizationCurve == null)
			{
				_NormalizationCurve = new Curve();
			}
			if (_ShiftCurve == null)
			{
				_ShiftCurve = new Curve();
			}
			if (_DifferenceCurve == null)
			{
				_DifferenceCurve = new Curve();
			}
		}
	}
}
